<?php
class AccountType{
	var $query;
	var $result;
	var $selectField;
	
	function result($query){
		$result = mysql_fetch_assoc($query);
		return $this->result = $result;
	}
	
	function query($sql){
		$query = mysql_query($sql);
		return $this->query = $query;	
	}
	
	function selectField($field,$table,$condition){
		$selectField = "SELECT $field FROM $table WHERE $condition";
		$result = $this->query($selectField);
		$row = $this->result($result);
		$getResult = $row[$field];
		return $this->selectField = $getResult;
	}
	
	function getLimitedPro($type){
		$getLimitedPro = $this->selectField('limit_product','tbluser_account_type','id ='.$type);
		return $getLimitedPro;
	}
	
	function getAccountExpire($type,$userId){
		$accountExpire = $this->selectField('account_expire','tbluser_account_type','id ='.$type);	
	}
}
?>